<template>
	<view class="content">
	<f-navbar title="管理后台" fontColor="#333" fontSize="34" bgColor="#fff">
		<view class="u-flex" slot="left">
			<van-icon name="arrow-left" color="#333" size="20" />
		</view>
	</f-navbar>
		<view class="content_box">
			<view class="content_top clearfix">
				<view class="content_toptitle " @click="gobalanceDetails">
					<view class="content_toptitleL">
						我的余额
					</view>
					<view class="content_toptitleR">
						<text class="titleRicon">￥</text>{{dataobj.store_item.amount}}
					</view>
				</view>
				<view class="content_txt ">
					<view class="content_txtL">
						<view class="xiadantitle">
							今日下单成交单数量
						</view>
						<view class="xiadannum">
							{{dataobj.store_item.day_number}}单
						</view>
					</view>
					<view class="content_txtR">
						<view class="xiadanmoneytitle">
							今日下单成交总额
						</view>
						<view class="xiadanmoney_num">
							<text class="xiadanicon">￥</text>{{dataobj.store_item.day_amount}}
						</view>
					</view>
				</view>
				<view class="top_tixianbtn" @click="onstoreWithdrawal">
					提 现
				</view>
			</view>
			
			<view class="content_orderbox">
				<view class="content_orderboxtitle" @click="onMyOrder(2)">我的订单</view>
				<view class="content_orderboxtxt">
			<!-- 		<view class="content_order">
						<view class="content_ordericon">
							<image class="imgicon" :src="imgurl+'daifukuan.png'" mode=""></image>
						</view>
						<view class="content_ordertxt">待付款</view>
					</view> -->
					<view class="content_order" @click="onMyOrder(2)">
						<view class="content_ordericon1">
							<image class="imgicon" :src="imgurl+'daifahuo.png'" mode=""></image>
						</view>
						<view class="content_ordertxt">待发货</view>
						<view class="toasticon" v-if="dataobj.order_item.wait_send_num>0">
							{{dataobj.order_item.wait_send_num>99?'99':dataobj.order_item.wait_send_num}}
						</view>
					</view>
					<view class="content_order" @click="onMyOrder(3)">
						<view class="content_ordericon2">
							<image class="imgicon" :src="imgurl+'daishouhuo.png'" mode=""></image>
						</view>
						<view class="content_ordertxt">待收货</view>
						<view class="toasticon" v-if="dataobj.order_item.wait_receive_num>0">
							{{dataobj.order_item.wait_receive_num>99?'99':dataobj.order_item.wait_receive_num}}
						</view>
					</view>
					<view class="content_order" @click="onMyOrder(4)">
						<view class="content_ordericon3">
							<image class="imgicon" :src="imgurl+'yiwancheng.png'" mode=""></image>
						</view>
						<view class="content_ordertxt">已完成</view>
					</view>
					<view class="content_order" @click="onMyOrder(5)">
						<view class="content_ordericon4">
							<image class="imgicon" :src="imgurl+'shouhou.png'" mode=""></image>
						</view>
						<view class="content_ordertxt">售后</view>
						<view class="toasticon" v-if="dataobj.order_item.after_sale_num>0">
							{{dataobj.order_item.after_sale_num>99?'99':dataobj.order_item.after_sale_num}}
						</view>
					</view>
				</view>
			</view>
			
			<view class="content_setupbox">
				<view class="content_setup" @click="onstoreWithdrawal">
					<view class="content_setupboximg">
						<image class="imgicon" :src="imgurl+'tixian.png'" mode=""></image>
					</view>
					<view class="content_setupboxtxt">申请提现</view>
				</view>
				<view class="content_setup" @click="onyinhangka">
					<view class="content_setupboximg_yh">
						<image class="imgicon" :src="imgurl+'yinhangka.png'" mode=""></image>
					</view>
					<view class="content_setupboxtxt">银行卡</view>
				</view>
				<button class="content_setup" open-type="contact" session-from="weapp" style="padding: 0; margin: 0; background:#fff" @click="lianxikefu">
					<view class="content_setupboximg1">
						<image class="imgicon" :src="imgurl+'lianxikefuicon.png'" mode=""></image>
					</view>
					<view class="content_setupboxtxt">联系客服</view>
				</button>
				<view class="content_setup" @click="onstoresetup">
					<view class="content_setupboximg2">
						<image class="imgicon" :src="imgurl+'shezhi.png'" mode=""></image>
					</view>
					<view class="content_setupboxtxt">账户设置</view>
				</view>
				<view class="content_setup" @click="onActivity">
					<view class="content_setupboximg3">
						<image class="imgicon" :src="imgurl+'dianpuhuodongixon.png'" mode=""></image>
					</view>
					<view class="content_setupboxtxt">店铺活动</view>
				</view>
				<view class="content_setup" @click="onStoreActivities">
					<view class="content_setupboximg4">
						<image class="imgicon" :src="imgurl+'shangpinguanliicon.png'" mode=""></image>
					</view>
					<view class="content_setupboxtxt">商品管理</view>
				</view>
				<view class="content_setup"  @click="onstoreClass">
					<view class="content_setupboximg5">
						<image class="imgicon" :src="imgurl+'dianpufeleiicon.png'" mode=""></image>
					</view>
					<view class="content_setupboxtxt">店铺分类</view>
				</view>

<!-- 				<view class="content_setup">
					<view class="content_setupboximg">
						<image class="imgicon" :src="imgurl+'bangzhuzhongxin.png'" mode=""></image>
					</view>
					<view class="content_setupboxtxt">帮助中心</view>
				</view> -->
				
			</view>

		</view>
	</view>
</template>

<script>
	import fNavbar from '@/uni_modules/f-navbar/components/f-navbar/f-navbar.vue';
	import {getStoreCenter} from '../../../utils/storeapp.js'
	export default {
		components: {
			fNavbar
		},
		data() {
			return {
				imgurl: getApp().globalData.imgurl,
				dataobj:{}, 
			}
		},
		onLoad() {
			this.getList()
		},
		methods: {
			// 获取数据
			getList(){
				getStoreCenter({

				}).then(res => {
					console.log(res);
					if(res.code==1){
						this.dataobj = res.data
					} else {
						uni.showToast({
							title: res.info,
							icon:'none',
							duration:2000
						})
					}
				})
			},
			// 跳转到余额明细页面
			gobalanceDetails(){
				uni.navigateTo({
					url:'/pages/subPack/BalanceDetails/BalanceDetails'
				})
			},
			
			// 跳转到银行卡
			onyinhangka(){
				uni.navigateTo({
					url:'/pages/subPack/shopBankCard/shopBankCard'
				})
			},
			// 店铺分类页面
			onstoreClass(){
				uni.navigateTo({
					url:'/pages/subPack/storeClass/storeClass'
				})
			},
			// 跳转到店铺活动页面
			onActivity(){
				uni.navigateTo({
					url:'/pages/subPack/moreActivity/moreActivity'
				})
				// uni.navigateTo({
				// 	url:'/pages/subPack/Activity/Activity'
				// })
			},
			// 跳转到商品管理页面
			onStoreActivities(){
				uni.navigateTo({
					url:'/pages/subPack/StoreActivities/StoreActivities'
				})
			},
			// 跳转到店铺设置页面
			onstoresetup(){
				uni.navigateTo({
					url:'/pages/subPack/storeSetup/storeSetup'
				})
			},
			
			// 跳转到商家体现页面
			onstoreWithdrawal(){
				uni.navigateTo({
					url:'/pages/subPack/storeWithdrawal/storeWithdrawal'
				})
			},
			// 跳转到我的订单页面
			onMyOrder(e){
				if(e==5){
					console.log(111);
					uni.navigateTo({
						url:'/pages/subPack/AfterSales/AfterSales'
					})
				} else {
					uni.navigateTo({
						url:'/pages/subPack/storeOrder/storeOrder?id='+e
					})
				}
		
			},

		},
	}
</script>

<style>
	page {
		background: #eee;
	}

	.content_top {
		width: 690rpx;
		height: 358rpx;
		margin: 0 auto;
		margin-top: 20rpx;
		background: url(https://yuanchubao.oss-cn-beijing.aliyuncs.com/guanlihoutaiimg.png) no-repeat;
		background-size: contain;
		position: relative;
	}

	.content_toptitle {
		width: 480rpx;
		height: 80rpx;
		/* background: pink; */
		position: absolute;
		left: 50%;
		top: 26rpx;
		transform: translateX(-50%);
		display: flex;
		align-items: center;
		justify-content: space-between;

	}

	.content_toptitleL {
		font-size: 28rpx;
		font-family: Hiragino Sans GB;
		font-weight: normal;
		color: #333333;
		line-height: 36rpx;
	}

	.content_toptitleR {
		font-size: 45rpx;
		font-family: Hiragino Sans GB;
		font-weight: normal;
		color: #6C3407;
		line-height: 36rpx;
	}

	.titleRicon {
		font-size: 24rpx
	}

	.content_txt {
		width: 690rpx;
		height: 120rpx;
		/* background: #000; */
		position: absolute;
		top: 145rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
.content_txtL{
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-left: 20rpx;
}
.xiadantitle{
	font-size: 28rpx;
	font-family: Hiragino Sans GB;
	font-weight: normal;
	color: #0E050A;
	/* line-height: 36rpx; */
}
.xiadannum{
	font-size: 38rpx;
	font-family: Hiragino Sans GB;
	font-weight: normal;
	color: #6C3407;
	/* line-height: 36rpx; */
	margin-top: 26rpx;
}
.content_txtR{
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-right: 20rpx;
}
.xiadanmoneytitle{
	font-size: 28rpx;
	font-family: Hiragino Sans GB;
	font-weight: normal;
	color: #0E050A;
	/* line-height: 36rpx; */
}
.xiadanmoney_num{
	font-size: 38rpx;
	font-family: Hiragino Sans GB;
	font-weight: normal;
	color: #6C3407;
	/* line-height: 36rpx; */
	margin-top: 26rpx;
}
.xiadanicon{
	font-size: 18rpx
}
.top_tixianbtn{
	width: 140rpx;
	height: 64rpx;
	background: #EF0E6C;
	border-radius: 32rpx;
	font-size: 28rpx;
	font-family: Hiragino Sans GB;
	font-weight: normal;
	color: #FFFFFF;
	line-height: 64rpx;
	text-align: center;
	position: absolute;
	left: 50%;
	top: 260rpx;
	transform: translateX(-50%);
}

.content_orderbox{
	width: 690rpx;
	height: 216rpx;
	background: #FFFFFF;
	border-radius: 10rpx;
	margin: 0 auto;
	margin-top: 20rpx;
}
.content_orderboxtitle{
	font-size: 28rpx;
	font-family: Hiragino Sans GB;
	font-weight: 700;
	color: #333333;
	margin-left: 20rpx;
padding-top: 38rpx;
}
.content_orderboxtxt{
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.content_order:first-child{
	margin-left: 30rpx;
}
.content_order:last-child{
	margin-right: 40rpx;
}
.content_order{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin-top: 20rpx;
	position: relative;
}
.toasticon{
	width: 30rpx;
	height: 30rpx;
	line-height: 30rpx;
	text-align: center;
	font-size: 22rpx;
	background-color: #EF0E6C;
	color: #fff;
	border-radius: 50%;
	position: absolute;
	right: -6rpx;
	top: -15rpx;
}
.content_ordericon{
	width: 51rpx;
	height: 46rpx;
	/* background: #000; */
}
.content_ordericon1{
	width: 51rpx;
	height: 45rpx;
		/* background: #000; */
}
.content_ordericon2{
	width: 51rpx;
	height: 48rpx;
		/* background: #000; */
}
.content_ordericon3{
	width: 51rpx;
	height: 44rpx;
		/* background: #000; */
}
.content_ordericon4{
	width: 51rpx;
	height: 45rpx;
		/* background: #000; */
}
.content_ordertxt{
	font-size: 28rpx;
	font-family: Hiragino Sans GB;
	font-weight: normal;
	color: #333333;
	margin-top: 20rpx;
	
}
.imgicon{
	width: 100%;
	height: 100%;
}
.content_setupbox{
	width: 690rpx;
	height: 314rpx;
	background: #FFFFFF;
	border-radius: 10rpx;
	margin: 0 auto;
	margin-top: 20rpx;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	/* justify-content: space-evenly; */
	box-sizing: border-box;
	padding: 30rpx 0;
}
.content_setup{
	width: 160rpx;
	height: 120rpx;
	display: flex;
	flex-direction:column;
	align-items: center;
	justify-content: flex-end;
	margin-right: 20rpx;
	/* justify-content: space-between; */
	/* margin-top: 40rpx; */
	
}
.content_setup:nth-child(4){
	margin-right: 0;
}
button::after{
	border:none;
	background-color:none;
	margin: 0;
	padding: 0;
	/* border-radius:0; */
}
.content_setupboximg{
	width: 50rpx;
	height: 55rpx;
	/* background: #000; */
}
.content_setupboximg1{
	width: 51rpx;
	height: 41rpx;
	margin-bottom: 25rpx;
	/* background: #000; */
}
.content_setupboximg2{
	width: 51rpx;
	height: 50rpx;
	/* background: #000; */
}
.content_setupboximg3{
	width: 50rpx;
	height: 34rpx;
	margin-bottom: 10rpx;
}
.content_setupboximg4{
	width: 50rpx;
	height: 46rpx;
	/* background: #000; */
}
.content_setupboximg5{
	width: 50rpx;
	height: 36rpx;
}
.content_setupboximg_yh{
		width: 41rpx;
		height: 31rpx;
		margin-bottom: 10rpx;
	}
.content_setupboxtxt{
	font-size: 28rpx;
	font-family: Hiragino Sans GB;
	font-weight: normal;
	color: #333333;
	margin-top: 16rpx;
	line-height: 28rpx;
}
.StoreCenter{
	width: 690rpx;
	height: 216rpx;
	background: #FFFFFF;
	border-radius: 10rpx;
	margin: 0 auto;
	margin-top: 20rpx;
}
.StoreCenter_title{
		font-size: 28rpx;
		font-family: Hiragino Sans GB;
		font-weight: 700;
		color: #333333;
		margin-left: 20rpx;
		padding-top: 38rpx;
}
.StoreCenter_item{
	display: flex;
	align-items: center;
	justify-content: flex-start;
}
.StoreCenter_box{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin-top: 20rpx;
	margin-left: 30rpx;
}
.StoreCenter_icon{
	width: 51rpx;
	height: 46rpx;
	/* background: #000; */
}
.StoreCenter_txt{
	font-size: 28rpx;
	font-family: Hiragino Sans GB;
	font-weight: normal;
	color: #333333;
	margin-top: 20rpx;
}





</style>